﻿using MySql.Data.MySqlClient;
using System.Data.Common;

namespace Kele.Repository
{
    public class Database : IDatabase
    {
        public Database(string connectionString)
        {
            ConnectionString = connectionString;
        }

        public string ConnectionString { get; }

  

        public DbConnection GetConnection()
        {
            if (string.IsNullOrWhiteSpace(ConnectionString)) return null;
            return new MySqlConnection(ConnectionString);
        }
    }
}